﻿@model IEnumerable<FinancasMD.Models.Carteira>

@{
    ViewBag.Title = "Carteira";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Carteira</title>
</head>
<body>
    <p>
        @Html.ActionLink("Adicionar Carteira", "Adicionar", null, new { @class = "btn btn-primary" })
    </p>
    <table>
        <tr>
            <th>@Html.DisplayNameFor(model => model.Descricao)</th>
            <th>@Html.DisplayNameFor(model => model.Saldo)</th>
            <th></th>
        </tr>
    
    @foreach (var item in Model) {
        <tr>
            <td>@Html.TextBoxFor(modelItem => item.Descricao)</td>
            <td>@Html.TextBoxFor(modelItem => item.Saldo)</td>
            <td>
                @Html.ActionLink("Editar", "Editar", new { id = item.Id }) 
                @Html.ActionLink("Excluir", "Excluir", new { id = item.Id })
            </td>
        </tr>
    }
    
    </table>
</body>
</html>
